package com.utils;

public class TemplateColumn {
    /**
     * 字段序号
     */
    private int id;

    /**
     * 字段名
     */
    private String name;

    /**
     * 字段描述
     */
    private String desc;

    /**
     * 字段长度
     */
    private int lenth;

    /**
     * 起始位置
     */
    private int start;

    /**
     * 结束位置
     */
    private int end;

    /**
     * 字段类型
     * A--字符型
     * N--数字型
     */
    private String type;

    /**
     * 校验正则表达式
     */
    private String regex;

    /**
     * 时间格式，默认为：YYYYMMDD
     */
    private String dataFormat;

    /**
     * 小数位数，默认为0
     */
    private int numFormat;

    /**
     * 字段是否跳过，用于文件解析时
     * 0--不跳过，默认值
     * 1-跳过
     */
    private int ignore;

    /**
     * 字段是否为空，用于组装文件行时
     * 0-不允许
     * 1-允许
     */
    private int allowNull;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public int getLenth() {
        return lenth;
    }

    public void setLenth(int lenth) {
        this.lenth = lenth;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    public int getEnd() {
        return end;
    }

    public void setEnd(int end) {
        this.end = end;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getRegex() {
        return regex;
    }

    public void setRegex(String regex) {
        this.regex = regex;
    }

    public String getDataFormat() {
        return dataFormat;
    }

    public void setDataFormat(String dataFormat) {
        this.dataFormat = dataFormat;
    }

    public int getNumFormat() {
        return numFormat;
    }

    public void setNumFormat(int numFormat) {
        this.numFormat = numFormat;
    }

    public int getIgnore() {
        return ignore;
    }

    public void setIgnore(int ignore) {
        this.ignore = ignore;
    }

    public int getAllowNull() {
        return allowNull;
    }

    public void setAllowNull(int allowNull) {
        this.allowNull = allowNull;
    }

    @Override
    public String toString() {
        return "TemplateColumn{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", desc='" + desc + '\'' +
                ", lenth=" + lenth +
                ", start=" + start +
                ", end=" + end +
                ", type='" + type + '\'' +
                ", regex='" + regex + '\'' +
                ", dataFormat='" + dataFormat + '\'' +
                ", numFormat=" + numFormat +
                ", ignore=" + ignore +
                ", allowNull=" + allowNull +
                '}';
    }
}
